<template>
  <div>
    comp
    <p>{{str}}</p>
  </div>
</template>

<script>
  import { ref, onMounted } from "@vue/composition-api";

  export default {
    setup(){
      const str = ref("this is 子组件");
      const setStr = () => {
        str.value = "被赋值拉~";
      };

      return {
        str,
        setStr
      };
    }
  };
</script>

<style scoped></style>
